﻿<controls:ChildWindow x:Class="Moria.Silverlight.Controls.LoadGameDialog"
                      x:Name="DialogBox"
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                      xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
                      xmlns:rb="http://Redbrick/Silverlight"
                      Width="400" Height="300" 
           Title="Restore Saved Game">
	<Grid x:Name="LayoutRoot" Margin="2">
		<Grid.RowDefinitions>
			<RowDefinition />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>
		<ListBox x:Name="lbSavedGames" Background="Transparent" BorderBrush="Black" BorderThickness="1" 
               SelectionChanged="ListBox_SelectionChanged"
					rb:DoubleClick.Command="{Binding ElementName=DialogBox, Path=ItemDoubleClickCommand}" >
		</ListBox>
		<Grid Grid.Row="1" HorizontalAlignment="Stretch">
			<Button x:Name="OKButton" Click="OKButton_Click" Width="Auto" Height="23" Margin="3" HorizontalAlignment="Left" IsEnabled="False" >
				<Grid Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Center">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="*"/>
						<ColumnDefinition Width="20"/>
					</Grid.ColumnDefinitions>
					<TextBlock Text="Load Game" HorizontalAlignment="Left" Margin="3,0"/>
					<Image Grid.Column="1" Source="/Moria.Silverlight;component/Assets/Images/accept.png" HorizontalAlignment="Right"   Margin="3,0"/>
				</Grid>
			</Button>
			<Button x:Name="CancelButton" Click="CancelButton_Click" Width="Auto" Height="23" Margin="3" HorizontalAlignment="Right">
				<Grid Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Center">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="*"/>
						<ColumnDefinition Width="20"/>
					</Grid.ColumnDefinitions>
					<TextBlock Text="Cancel" HorizontalAlignment="Left" Margin="3,0"/>
					<Image Grid.Column="1" Source="/Moria.Silverlight;component/Assets/Images/cancel.png" HorizontalAlignment="Right"   Margin="3"/>
				</Grid>
			</Button>
		</Grid>
	</Grid>
</controls:ChildWindow>